/**
 * 
 */
package com.hexacta.hrs.services.skill.impl;

import java.util.List;

import org.vectrics.cv.Skill;

import com.hexacta.hrs.repositories.RecordObjectRepository;
import com.hexacta.hrs.services.skill.SkillService;

/**
 * @author mfunes
 *
 */
class SkillServiceImpl implements SkillService {

    /** un {@link RecordObjectRepository} a usar. */
    private RecordObjectRepository<Skill> skillGenericRepository;
    
    public void setSkillGenericRepository(RecordObjectRepository<Skill> skillGenericRepository) {
        this.skillGenericRepository = skillGenericRepository;
    }

    /* (non-Javadoc)
     * @see com.hexacta.hrs.services.skill.SkillService#getAll()
     */   
    public List<Skill> getAll() {
        return (List<Skill>) skillGenericRepository.all();
    }

    @Override
    public Skill getRootNode() {
        return skillGenericRepository.forId(1L); 
    }

}
